package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author krystal
 * @date 2023/3/9 21:32
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @RequestMapping("/hi")
    public String sayHi(String name){
        System.out.println("执行了 sayHi 方法");
        return "hi,"+name;
    }

    @RequestMapping("/hello")
    public String sayHello(){
        System.out.println("执行了 sayHello 方法");
        return "hello,baekhyun";
    }
}
